]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
status: use Shell.AppSystem to launch settings panels
authorDiego Escalante Urrelo <descalante@igalia.com>
Fri, 18 Mar 2011 02:05:53 +0000 (21:05 -0500)
committerDiego Escalante Urrelo <descalante@igalia.com>
Fri, 18 Mar 2011 04:26:14 +0000 (23:26 -0500)
Different methos are being used to launch the control-center panels of each
status icon. Standarize on Shell.AppSystem.
This also fixes the network icon using a non-existant Util.spawnDesktop()
method.

Bug #645091

js/ui/status/bluetooth.js
js/ui/status/keyboard.js
js/ui/status/network.js

index 092cd1ae8b392a9cae5286b7e15adff2d06e51a3..070016aac84a2c50e0cafe5059c4a8d6b5849156 100644 (file)
@@ -93,7 +93,8 @@ Indicator.prototype = {
         this._updateFullMenu();
 
         this.menu.addAction(_("Bluetooth Settings"), function() {
-            GLib.spawn_command_line_async('gnome-control-center bluetooth');
+            let app = Shell.AppSystem.get_default().get_app('bluetooth-properties.desktop');
+            app.activate(-1);
         });
 
         this._applet.connect('pincode-request', Lang.bind(this, this._pinRequest));
index ae498e0f9d68ab03e2106e46fad8102bb6132348..06a0b499177c98a028f575a6533b117846d09a5a 100644 (file)
@@ -74,7 +74,8 @@ XKBIndicator.prototype = {
             Util.spawn(['gkbd-keyboard-display', '-g', String(this._config.get_current_group() + 1)]);
         }));
         this.menu.addAction(_("Localization Settings"), function() {
-            Util.spawn(['gnome-control-center', 'region']);
+            let app = Shell.AppSystem.get_default().get_app('gnome-region-panel.desktop');
+            app.activate(-1);
         });
     },
 
index 3b240f3bc825f61439426aa5ca34002b7d103b6c..2e33b4b1718de7c26e0cad1fd196b1da27b5cde2 100644 (file)
@@ -1486,7 +1486,8 @@ NMApplet.prototype = {
         this.menu.addMenuItem(this._devices.vpn.section);
 
         this.menu.addAction(_("Network Settings"), function() {
-            Util.spawnDesktop('gnome-network-panel');
+            let app = Shell.AppSystem.get_default().get_app('gnome-network-panel.desktop');
+            app.activate(-1);
         });
 
         this._activeConnections = [ ];